<?php
class NewTaskRewardAction extends SzAbstractAction {
    protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
    );

    /**
     * @param $userId
     * @param $reqTime
     * @return SzResponse
     */
    public function execute($userId,$taskId) {
        if (!GameService::get()->verifySysUnlock($userId, GameConst::FUNC_GRANDMA)) {
            return $this->buildResponse(false);
        }
        return $this->buildResponse(
            NewTaskService::get()->reward($userId,$taskId)
        );
    }
}